package com.grm.sys.service.impl;

import com.grm.sys.mapper.*;
import com.grm.sys.model.SysUser;
import com.grm.sys.service.SysUserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
@Slf4j
public class SysUserServiceImpl implements SysUserService {
    @Autowired
    private SysUserMapper sysUserMapper;

    @Override
    public List<SysUser> querySelective(Long pageNum, Integer pageSize, SysUser queryParam) {
        Long offset = (pageNum - 1) * pageSize;
        return sysUserMapper.querySelective(offset, pageSize, queryParam);
    }

    @Override
    public Long queryTotal(SysUser queryParam) {
        return sysUserMapper.queryTotal(queryParam);
    }

    @Override
    public void add(SysUser sysUser) {
        sysUserMapper.add(sysUser);
    }

    @Override
    public List<SysUser> queryAll() {
        return sysUserMapper.queryAll();
    }
}
